package com.model.struts.action;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.ServletActionContext;

import com.model.struts.base.BaseAction;

public class FreemarkerAction extends BaseAction {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String user;
	private List list;
	
	
	public List getList() {
		return list;
	}


	public void setList(List list) {
		this.list = list;
	}



	@Override
	public String execute() throws Exception {
		ServletActionContext.getRequest().setAttribute("message", "hello freemarker");
		List list = new ArrayList();
		for(int i=0;i<10;i++){
			list.add("element" + i);
		}
		setList(list);
		return SUCCESS;
	}
	
	
	
	
}
